docker stop slam
docker start alpha
docker exec alpha service ssh start
reset

pushd "/home/xiay/alpha/ikitrobot_one/src/check/"
git add .
git commit -m "modify check"
git push origin master -f
popd

ssh root@172.17.0.2 'cd /root/alpha/ikitrobot_one/src/check/ && git reset --hard origin/master && git pull'
ssh root@172.17.0.2 '/root/alpha/ikitrobot_one/src/check/scripts/build.sh'
ssh pi@10.42.0.1 '/home/pi/ikitrobot_one/utility/shutdown_ros.sh'
ssh pi@10.42.0.1 'mkdir -p /home/pi/ikitrobot_one/install/lib/check'
ssh pi@10.42.0.1 'mkdir -p /home/pi/ikitrobot_one/install/share/check/launch'
ssh pi@10.42.0.1 'mkdir -p /home/pi/ikitrobot_one/install/share/check/udev'
ssh pi@10.42.0.1 'mkdir -p /home/pi/ikitrobot_one/install/share/check/config'
scp ~/alpha/ikitrobot_one/src/check/package.xml pi@10.42.0.1:/home/pi/ikitrobot_one/install/share/check/
scp ~/alpha/ikitrobot_one/src/check/launch/check.launch pi@10.42.0.1:/home/pi/ikitrobot_one/install/share/check/launch/
scp ~/alpha/ikitrobot_one/src/check/udev/drivers.rules pi@10.42.0.1:/home/pi/ikitrobot_one/install/share/check/udev/
scp ~/alpha/ikitrobot_one/src/check/config/* pi@10.42.0.1:/home/pi/ikitrobot_one/install/share/check/config/
ssh pi@10.42.0.1 'rm /home/pi/ikitrobot_one/install/lib/check/check_node'
scp root@172.17.0.2:/root/alpha/ikitrobot_one/devel/lib/check/check_node .
scp check_node pi@10.42.0.1:/home/pi/ikitrobot_one/install/lib/check/
ssh pi@10.42.0.1 'sudo chmod +x /home/pi/ikitrobot_one/install/lib/check/*'
rm check_node

#ssh pi@10.42.0.1 'sudo ln -s /dev/bus/usb/005/013 /dev/camera_up'
#ssh pi@10.42.0.1 'sudo ln -s /dev/bus/usb/001/005 /dev/camera_down'

#ssh pi@10.42.0.1 'sudo cp /home/pi/ikitrobot_one/install/share/check/udev/drivers.rules /etc/udev/rules.d/ && sudo udevadm trigger'
ssh pi@10.42.0.1 'source /opt/ros/melodic/setup.bash && source ~/ikitrobot_one/install/setup.bash && roslaunch check check.launch'
ssh pi@10.42.0.1 'tail -f  /home/pi/log/latest/ikitrobot_one.log'